import { createRouter, createWebHistory } from "vue-router";
import Login from '@/views/admin/Login.vue'
import AdminDetailPage from "@/views/admin/AdminDetailPage.vue";
import HomePage from '@/views/HomePage/HomePage.vue'
import SearchResults from '@/views/HomePage/SearchResults.vue'
import AdminPage from '@/views/HomePage/AdminPage.vue'
import AiChat from '@/views/HomePage/AiChat.vue'
import InfoMore from '@/views/TabsMore/InfoMore.vue'
import LifeMore from '@/views/TabsMore/LifeMore.vue'
import NewsMore from '@/views/TabsMore/NewsMore.vue'
import PeopleMore from '@/views/TabsMore/PeopleMore.vue'
import HotMore from '@/views/TabsMore/HotMore.vue'
import TestRearchResults from '@/views/HomePage/TestRearchResults.vue'
import SearchWithApi from '@/views/HomePage/SearchWithApi.vue'
const router =createRouter({
    history:createWebHistory(import.meta.env.BASE_URL),
    routes:[
        {
            path: '/Login',
            name: 'Login',
            component:Login
        },
        {
            path: '/AdminPage',
            name: 'AdminPage',
            component:AdminPage
        },
        {
            path:'/AdminDetailPage',
            name:'AdminDetailPage',
            component:AdminDetailPage
        },
        {
            path:'/',
            component:()=>import('@/views/LayoutContainer.vue'),
            redirect:'/HomePage',
            children:[
                {
                    path:'/HomePage/DetailPage',
                    component:()=>import('@/views/HomePage/DetailPage.vue')
                },
                {
                    path:'/HomePage',
                    component:()=>import('@/views/HomePage/HomePage.vue')
                }
            ]
        }
        ,{
            path: '/ai',
            name: 'AiChat',
            component: AiChat
        },{
            path: '/info',
            name: 'InfoMore',
            component: InfoMore
        },{
            path: '/life',
            name: 'LifeMore',
            component: LifeMore
        },{
            path: '/news',
            name: 'NewsMore',
            component: NewsMore
        },{
            path: '/people',
            name: 'PeopleMore',
            component: PeopleMore
        },{
            path: '/hot',
            name: 'HotMore',
            component: HotMore
        },{
            path: '/test',
            name: 'TestRearchResults',
            component:TestRearchResults
        },{
            path: '/search',
            name: 'SearchWithApi',
            component:SearchWithApi
        },
    ]
})

export  default router